<template>
  <div class="app-container">
    <MyHeader :title="title"></MyHeader>
    <MyGoods v-for="item in list" :key="item.id" :goods="item"></MyGoods>
    <MyFooter :list="list"></MyFooter>
    
    
  </div>
</template>

<script>

import MyFooter from './components/MyFooter.vue'
import MyGoods from './components/MyGoods.vue'
import MyHeader from './components/MyHeader.vue'
export default {
  name: 'ShopcarApp',
  components:{
    
    MyFooter,
    MyGoods,
    MyHeader
  },
  async created(){
    let res = await this.$axios({url:'./api/cart'})
    console.log(res);
    this.list=res.data.list
  },

  data() {
    return {
      title:'首页',
      list:[]
    };
  },

  mounted() {
    
  },

  methods: {
    
  },
};
</script>

<style lang="less" scoped>
.app-container{
  padding: 45px 0 50px 0;
}
</style>
